package cz.muni.fi.pa165.musiclibrary.musiclibraryweb.components.image;

import org.apache.wicket.request.resource.DynamicImageResource;

/**
 *
 * @author Maros Kucbel
 * @date 2012-12-01T11:06:40+0100
 */
public final class ImageResource extends DynamicImageResource {

    private byte[] data;
    
    public ImageResource(byte[] data, String format) {
        this.data = data;
        this.setFormat(format);
    }
    
    @Override
    protected byte[] getImageData(Attributes attributes) {
        return this.data;
    }

}